<?php 
$filterchain = null;
$config = array();
$config['lang'] = 'de_DE';
$config['imgresURL'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'relPath'))).'main/imgres/';
$config['imgresPath'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'absWebPath'))).'/main/imgres/';
$config['adminPath'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'absPath'))).'/admin/';
$env->setConfigAll($config);
$filterchain = new phpinchains_FilterChain($env, (__id($env, $actionform, array('globalScope', 'cfgPaths', 'basePath'))).'filter');
if ($filterchain->match('/admin/*')):
$filter[0]["class"] = 'LoadFileFilter';
$filter[0]["match"] = '/admin/*.(gif|jpg|png|css|js)';
$filter[0]["group"] = 'admin';
$filter[1]['file'] = (__id($env, $actionform, array('configScope', 'imgresPath'))).'{1}.{2}';
$filter[1]['cache-headers'] = 'true';
$filter[1]['defaultfile'] = (__id($env, $actionform, array('configScope', 'imgresPath'))).'404.html';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'LoadFileFilter';
$filter[0]["match"] = '/admin/cms/wysiwyg/*.html';
$filter[0]["group"] = 'admin';
$filter[1]['file'] = (__id($env, $actionform, array('configScope', 'imgresPath'))).'cms/wysiwyg/{1}.html';
$filter[1]['cache-headers'] = 'true';
$filter[1]['defaultfile'] = (__id($env, $actionform, array('configScope', 'imgresPath'))).'404.html';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '/admin/cms/wysiwyg/*.html';
$filter[0]["group"] = 'admin';
$filter[1]['target'] = (__id($env, $actionform, array('configScope', 'imgresURL'))).'cms/wysiwyg/{1}.html';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '/admin/*.(gif|jpg|png|css|js)';
$filter[0]["group"] = 'admin';
$filter[1]['target'] = ((__id($env, $actionform, array('configScope', 'imgresURL', array((0))))=="/"?"/" . __id($env, $actionform, array('configScope', 'imgresURL')):__id($env, $actionform, array('configScope', 'imgresURL')))).'{1}.{2}';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'AdminAuthenticationFilter';
$filter[0]["match"] = '*';
$filter[1]['install'] = 'false';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'DispatchLegacyAdminFilter';
$filter[0]["match"] = '/admin/*.(php|html)';
$filter[0]["group"] = 'admin';
$filter[1]['admin-dir'] = __id($env, $actionform, array('globalScope', 'cfgPaths', 'adminPath'));
$filter[1]['target-file'] = '{1}';
$filter[1]['target-extension'] = '{2}';
$filterchain->addFilter($filter); unset($filter);
endif;
if ($filterchain->match('/document/*')):
$filter[0]["class"] = 'PathInfoActionParamFilter';
$filter[0]["match"] = '/document/*?/*.(html|rss|json)';
$filter[0]["group"] = 'editor';
$filter[1]['module'] = '/editor';
$filter[1]['action'] = '{1}';
$filter[1]['parameters'] = '{2}';
$filter[1]['medium'] = '{3}';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'PathInfoActionParamFilter';
$filter[0]["match"] = '/document/*.(html|rss|json)';
$filter[0]["group"] = 'editor';
$filter[1]['module'] = '/editor';
$filter[1]['action'] = '{1}';
$filter[1]['parameters'] = "";
$filter[1]['medium'] = '{2}';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'PathInfoActionParamFilter';
$filter[0]["match"] = '/document/(*?/*|*)';
$filter[0]["group"] = 'editor';
$filter[1]['module'] = '/editor';
$filter[1]['action'] = '{2}{4}';
$filter[1]['parameters'] = '{3}';
$filter[1]['medium'] = 'html';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '*';
$filter[1]['target'] = '/admin/';
$filter[1]['condition'] = !__id($env, $actionform, array('sessionScope', 's_user', 'authenticated'));
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'ActionDispatcherFilter';
$filter[0]["match"] = '/document/*';
$filter[1]['basedir'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'basePath'))).'document';
$filter[1]['bypass-mapping'] = 'true';
$filter[1]['use-compiledir'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'basePath'))).'document/view/c';
$filter[1]['class-extension'] = '.php';
$filter[1]['view-by-methodname'] = 'true';
$filterchain->addFilter($filter); unset($filter);
endif;
$actionform->set('modules', array("usermanager","system"));
if (is_array(__id($env, $actionform, array('modules')))) foreach (__id($env, $actionform, array('modules')) as $mod) {
$actionform->set('mod', $mod);
if ($filterchain->match('/adminmod/'.(__id($env, $actionform, array('mod'))).'/*')):
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '*';
$filter[1]['target'] = '/admin/';
$filter[1]['condition'] = !__id($env, $actionform, array('sessionScope', 's_user', 'authenticated'));
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'AdminEnvironmentFilter';
$filter[0]["match"] = '*';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'PathInfoActionParamFilter';
$filter[0]["match"] = '/adminmod/'.(__id($env, $actionform, array('mod'))).'/(*?/*|*)';
$filter[1]['module'] = '/adminmod/'.(__id($env, $actionform, array('mod')));
$filter[1]['action'] = '{2}{4}';
$filter[1]['parameters'] = '{3}';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'ActionDispatcherFilter';
$filter[0]["match"] = '/adminmod/'.(__id($env, $actionform, array('mod'))).'/*';
$filter[1]['basedir'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'basePath'))).'modules/'.(__id($env, $actionform, array('mod')));
$filter[1]['use-compiledir'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'basePath'))).'modules/'.(__id($env, $actionform, array('mod'))).'/view/c';
$filter[1]['class-extension'] = '.php';
$filter[1]['view-by-methodname'] = 'true';
$filterchain->addFilter($filter); unset($filter);
endif;
}
if ($filterchain->match('/xicsmodule/*')):
$filter[0]["class"] = 'ActionDispatcherFilter';
$filter[0]["match"] = '/xicsmodule/*?.*?/*';
$filter[1]['basedir'] = __id($env, $actionform, array('globalScope', 'cfgPaths', 'mod'));
$filter[1]['class-extension'] = '.o.inc.php';
$filter[1]['module'] = '{1}';
$filter[1]['instance'] = '{2}';
$filter[1]['action'] = '{3}';
$filterchain->addFilter($filter); unset($filter);
endif;
if ($filterchain->match('/helpwin/*')):
$filter[0]["class"] = 'FrameFilter';
$filter[0]["match"] = '/helpwin/frame/anquor/*?/*';
$filter[1]['rows'] = '30,*';
$filter[1]['border'] = '1';
$filter[1]['frame1'] = 'src=\''.(__id($env, $actionform, array('serverScope', 'SCRIPT_NAME'))).'/helpwin/title\' name=\'head\' scrolling=\'no\' noresize=\'noresize\'';
$filter[1]['frame2'] = 'src=\''.(__id($env, $actionform, array('serverScope', 'SCRIPT_NAME'))).'/help/{2}#{1}\' name=\'page\'';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'FrameFilter';
$filter[0]["match"] = '/helpwin/frame/top/*';
$filter[1]['rows'] = '30,*';
$filter[1]['border'] = '1';
$filter[1]['frame1'] = 'src=\''.(__id($env, $actionform, array('serverScope', 'SCRIPT_NAME'))).'/helpwin/title\' name=\'head\' scrolling=\'no\' noresize=\'noresize\'';
$filter[1]['frame2'] = 'src=\''.(__id($env, $actionform, array('serverScope', 'SCRIPT_NAME'))).'/help/{1}\' name=\'page\'';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'IncludeFileFilter';
$filter[0]["match"] = '/helpwin/title';
$filter[1]['file'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'adminPath'))).'help/title.html';
$filterchain->addFilter($filter); unset($filter);
endif;
if ($filterchain->match('/help/*')):
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '/help/*';
$filter[1]['target'] = '/admin/';
$filter[1]['condition'] = !__id($env, $actionform, array('sessionScope', 's_user', 'authenticated'));
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '/help/image/*';
$filter[1]['target'] = (__id($env, $actionform, array('configScope', 'imgresURL'))).'help/{1}';
$filter[1]['add-slash'] = 'false';
$filterchain->addFilter($filter); unset($filter);
if ($filterchain->match('/help/show/*')):
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '/help/show/*?/*';
$filter[1]['target'] = '/help/select/{1}/{2}';
$filter[1]['add-slash'] = 'false';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'LoadFileFilter';
$filter[0]["match"] = '/help/show/*';
$filter[0]["capture"] = 'true';
$filter[0]["captureAttribute"] = 'helpXML';
$filter[1]['file'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'adminPath'))).'data/{1}.xml';
$filter[1]['defaultfile'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'adminPath'))).'data/index.xml';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'XSLTFilter';
$filter[0]["match"] = '*';
$filter[1]['parameters'] = 'scriptname';
$filter[1]['scriptname'] = __id($env, $actionform, array('serverScope', 'SCRIPT_NAME'));
$filter[1]['attribute'] = 'helpXML';
$filter[1]['stylesheet'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'lib'))).'xsl/help/help.xsl';
$filterchain->addFilter($filter); unset($filter);
endif;
if ($filterchain->match('/help/select/*')):
$filter[0]["class"] = 'LoadFileFilter';
$filter[0]["match"] = '/help/select/*?/*?/*';
$filter[0]["capture"] = 'true';
$filter[0]["captureAttribute"] = 'helpXML';
$filter[1]['file'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'adminPath'))).'data/{1}.xml';
$filter[1]['defaultfile'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'adminPath'))).'data/index.xml';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'XSLTFilter';
$filter[0]["match"] = '/help/select/*?/*?/*';
$filter[1]['parameters'] = 'file,chapter,paragraph,scriptname';
$filter[1]['file'] = '{1}';
$filter[1]['chapter'] = '{2}';
$filter[1]['paragraph'] = '{3}';
$filter[1]['scriptname'] = __id($env, $actionform, array('serverScope', 'SCRIPT_NAME'));
$filter[1]['attribute'] = 'helpXML';
$filter[1]['stylesheet'] = (__id($env, $actionform, array('globalScope', 'cfgPaths', 'lib'))).'xsl/help/helpSel.xsl';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '/help/select/*?/*';
$filter[1]['target'] = '/help/show/{1}';
$filter[1]['add-slash'] = 'false';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '/help/select/*';
$filter[1]['target'] = '/help/show/{1}';
$filter[1]['add-slash'] = 'false';
$filterchain->addFilter($filter); unset($filter);
endif;
endif;
$confparts = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
                $file = explode("/", 'modules/coreModules.xml');
                while ($file[0] == '..')
                {
                    array_shift($file);
                    array_pop($confparts);
                }
                $conf = join("/", $confparts)."/".join("/", $file);
                PHPinChains :: compileConfigFile($conf);
                include_once($conf.".php");
                
$confparts = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
                $file = explode("/", 'modules/simpleViewer.xml');
                while ($file[0] == '..')
                {
                    array_shift($file);
                    array_pop($confparts);
                }
                $conf = join("/", $confparts)."/".join("/", $file);
                PHPinChains :: compileConfigFile($conf);
                include_once($conf.".php");
                
$confparts = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
                $file = explode("/", 'modules/simpleViewerGallery.xml');
                while ($file[0] == '..')
                {
                    array_shift($file);
                    array_pop($confparts);
                }
                $conf = join("/", $confparts)."/".join("/", $file);
                PHPinChains :: compileConfigFile($conf);
                include_once($conf.".php");
                
$confparts = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
                $file = explode("/", 'modules/templateEngine.xml');
                while ($file[0] == '..')
                {
                    array_shift($file);
                    array_pop($confparts);
                }
                $conf = join("/", $confparts)."/".join("/", $file);
                PHPinChains :: compileConfigFile($conf);
                include_once($conf.".php");
                
$confparts = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
                $file = explode("/", 'modules/wineryOrderForm.xml');
                while ($file[0] == '..')
                {
                    array_shift($file);
                    array_pop($confparts);
                }
                $conf = join("/", $confparts)."/".join("/", $file);
                PHPinChains :: compileConfigFile($conf);
                include_once($conf.".php");
                
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '*';
$filterchain->addFilter($filter); unset($filter);
$filter[0]["class"] = 'RedirectFilter';
$filter[0]["match"] = '*';
$filter[1]['target'] = '/admin/index.php';
$filter[1]['add-slash'] = 'false';
$filterchain->addFilter($filter); unset($filter);
if ($filterchain != null) $filterchain->startChain();

?>